<template>
  <div class="about">
    <h1>个人中心页面</h1>
  </div>
</template>
<script>
export default {
  data() {
    return {};
  },
  beforeRouteEnter(to, from, next) {
    if (localStorage.getItem("islogin")) {
      next();
    } else {
      next("/login");
    }
  },
  //路由进入之前
  //只守卫这个组件

  // beforeRouteUpdate() {},
  // beforeRouteLeave(to, from, next) {
  //   // ...
  // },
  //路由更新和路由离开
};
</script>
